<!DOCTYPE html>
<html>
<head>
	<meta charset="UTF-8">
	<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
	<link rel="stylesheet" href="css/base.min.css"/>
	<link rel="stylesheet" href="css/common.css">
	<script src="js/jquery.1.7.2.min.js"></script>
	<script src="js/layer/layer.js" type="text/javascript"></script>
	<title>用户注册</title>
	<script src="js/avalon.js"></script>
	<script>
		var vm=avalon.define({
			$id:'app',
			form:{
				nickname:'Megic',
				pic:'css/image/logo.jpg',
				sex:'1',
				name:'',
				type:1,
				password:''
			},
			choose:function(type){
				var tpl;
				vm.form.type=type;
				if(type==1)tpl='<input type="text" placeholder="真实姓名" class="layer"/>';
				if(type==2)tpl='<input type="text" placeholder="注册密码" class="pass"/><br/><input type="text" placeholder="真实姓名" class="layer"/>';
					layer.open({
						title: [
							'注册确认',
							'background-color:rgb(38,189,170); color:#fff;'
						],
						content: tpl,
						btn: ['确认', '取消'],
						shadeClose: false,
						yes: function(){
							vm.password=$('.pass').val();
							vm.name=$('.layer').val();
							$.post('',vm.form.$model,function(data){

							});
							//vm.name.push($('.layer').val());
						}
					});
			}
		});
	</script>
</head>
<body ms-controller="app" id="login">
	<div class="wxw-heading">
		<span class="wxw-heading-newClass">老西部英语-课堂打分</span>
	</div>
	<div class="wxw-container4">
		<div class="wxw-container4-logo">
			<img ms-attr-src="form.pic" >
			<h1>{{form.nickname}}</h1>
		</div>
		<div class="wxw-container4-bnt">
			<button ms-click="choose(1)" class="wxw-container4-bnt1">我是学生</button>
			<button ms-click="choose(2)" class="wxw-container4-bnt2">我是老师</button>
		</div>
	</div>

</body>
</html>